<?php
/* 问题管理控制器
* @Author: Jerry-chen
* @Date:   2014-07-16 02:40:23
* @Last Modified time: 2014-07-28 11:45:14
* @Last Modified by: Jerry-chen<uranusbill@163.com>
* @ Copyright (c) 2014 http://www.cooldreamer.com All rightsreserved.
*/

class AskControl extends CommonControl
{
	/**
	 * [ask 用户提问]
	 * @return [type] [description]
	 */
	public function ask()
	{

		// p(Q('post.'));
		if(IS_POST)
		{
			$askdata = array(
				'askcontent'=>Q('post.askcontent'),
				'userid'=>session('uid'),
				'goodsid'=>Q('post.goodsid'),
				'asknumber'=>time(),
				'nickname'=>session('nickname'),


				);
			$result = K('Ask')->add_($askdata);
			if($result){
				$this->success('您的问题已提交成功，我们的客服会在第一时间回复您','');
			}else{
				$this->error('您的问题已提交失败','');
			}
			
			// p($data);

		}
	}
	
}